package com.ces.newPOS.admin.dao.client;

import com.ces.newPOS.admin.entity.User;
import java.util.Collection;
import java.util.Map;
import javax.ejb.ObjectNotFoundException;
import javax.ejb.Remote;

/**
 *
 * @author qiao
 */
@Remote
public interface UserDao
{
  User findByPrimaryKey(Integer pk) throws ObjectNotFoundException;

  Collection<User> findByGroupId(Integer groupId);

  Collection<Integer> getAllPrimaryKeys();

  Collection<Integer> getAllPrimaryKeysWithDisabled();

  Collection<User> getAllUsers();

  User createUser(User user);

  User disableUser(Integer userId) throws ObjectNotFoundException;

  User updateUser(User user);

  Collection findByUsername(String username);

  User findByLoginId(String loginId) throws ObjectNotFoundException;

  Collection<Integer> findPrimaryKeysByKeyword(String keyword);

  Collection<Integer> findPrimaryKeysByLoginIdAndUsername(String loginId, String username);
  
  Map findByUsernameandPassword(String username,String password);
  
  User addUser(String name,String password);

}
